<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>智慧燃气平台</title>
  <link rel="icon" href="./favicon.png" type="image/x-icon">
  <link rel="stylesheet" href="./index.css" />
  <!--icon 库链接 -->
  <link href="//at.alicdn.com/t/font_973762_7fbjsyit23u.css" rel="stylesheet">
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.11&key=bbc3b0af5d843c03baca543b9981aa6f"></script>
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.7&key=bbc3b0af5d843c03baca543b9981aa6f"></script> 
  <link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.3.0/video-js.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.3.0/video.min.js"></script>

</head>
<body>

<div id="root"></div>

<script src="./index.js"></script>
<script>
        var count = 0;
        var outTime=30;//分钟
        window.setInterval(go, 1000);
        function go() {
            count++;
            if (count*60 == outTime) {
                
               function DelCookie(name) {
                var exp = new Date();
                exp.setTime(exp.getTime() - 1);
                document.cookie = name + "=; expires=" + exp.toGMTString();
                }
                DelCookie("rememberMeId")
                DelCookie("userName")
                window.location.href='http://47.98.139.76:9090/hh-web/#/'
                alert("您因长时间未进行操作导致页面过期");
            }
        }

       var x ;
        var y ;
     //监听鼠标
        document.onmousemove = function (event) {
            var x1 = event.clientX;
            var y1 = event.clientY;
            if (x != x1 || y != y1) {
                count = 0;
            }
            x = x1;
            y = y1;
        };

        //监听键盘
        document.onkeydown = function () {
            count = 0;
        };


    </script>
</body>
</html>
